package org.spring.sample.anntation;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

import org.springframework.util.StringUtils;


public class NotEmptyValidator implements ConstraintValidator<NotEmpty, String>{

	@Override
	public void initialize(NotEmpty constraintAnnotation) {
	}

	@Override
	public boolean isValid(String value, ConstraintValidatorContext arg1) {
		return !StringUtils.isEmpty(value);
	}

}
